package org.sipsl.gisystems.gentest.rte.util;

import java.util.Map;

public class DataParams extends Params{

	private String VOLUME;
	private String APN;
	private String SGSN;
	private String CATEGORY_ID = "1";
	private String RULEBASE_ID;
	private String RADIOACCESSTECHNOLOGY = "1";

	
	public DataParams(Map<String, String> params) {
		
		super(params);
		setMSISDN(getParamMap().get("MSISDN"));
		setIMSI(getParamMap().get("IMSI"));
		setVOLUME(getParamMap().get("VOLUME"));
		setAPN(getParamMap().get("APN"));
		setSGSN((getParamMap().get("SGSN") == null) ? DefaultParams.HomeSGSN : getParamMap().get("SGSN"));;
		setCATEGORY_ID((getParamMap().get("CATEGORY_ID") == null) ? DefaultParams.CATEGORY_ID : getParamMap().get("CATEGORY_ID"));
		setRULEBASE_ID((getParamMap().get("RULEBASE_ID") == null) ? DefaultParams.RULEBASE_ID : getParamMap().get("RULEBASE_ID"));
		setRADIOACCESSTECHNOLOGY((getParamMap().get("RADIOACCESSTECHNOLOGY") == null) ? DefaultParams.RADIOACCESSTECHNOLOGY : getParamMap().get("RADIOACCESSTECHNOLOGY"));
	}

	public String getVOLUME() {
		return VOLUME;
	}


	public void setVOLUME(String vOLUME) {
		VOLUME = vOLUME;
	}


	public String getAPN() {
		return APN;
	}


	public void setAPN(String aPN) {
		APN = aPN;
	}


	public String getSGSN() {
		if (SGSN.substring(0, 2).compareTo("0x") == 0){
			return SGSN;
		}else {
			return "0x" + Long.toHexString( GenericUtil.ipToLong(SGSN) ).toUpperCase();
		}
			
	}


	public void setSGSN(String sGSN) {
		SGSN = sGSN;
	}


	public String getCATEGORY_ID() {
		return CATEGORY_ID;
	}


	public void setCATEGORY_ID(String cATEGORY_ID) {
		CATEGORY_ID = cATEGORY_ID;
	}


	public String getRULEBASE_ID() {
		return RULEBASE_ID;
	}


	public void setRULEBASE_ID(String rULEBASE_ID) {
		RULEBASE_ID = rULEBASE_ID;
	}


	public String getRADIOACCESSTECHNOLOGY() {
		return RADIOACCESSTECHNOLOGY;
	}


	public void setRADIOACCESSTECHNOLOGY(String rADIOACCESSTECHNOLOGY) {
		RADIOACCESSTECHNOLOGY = rADIOACCESSTECHNOLOGY;
	}

}
